import config from "@/config"
import http from "@/utils/request"

export default {
	//销售单
	contract:{
		list: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/lists`,
			name: "获取销售单列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/edit`,
			name: "修改销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/add`,
			name: "添加销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/delete`,
			name: "删除销售单",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		detail: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/detail`,
			name: "销售单详情",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		check: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/checkStatus`,
			name: "审核销售单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		uncheckStatus: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/uncheckStatus`,
			name: "审核销售单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        cancel: {
			url: `${config.API_URL}/adminapi/shop.ContractOrder/cancel`,
			name: "作废销售单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        detailList:{
            url: `${config.API_URL}/adminapi/shop.contractOrder/goodsLists`,
			name: "获取销售单下的商品",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
        },
        transfer: {
			url: `${config.API_URL}/adminapi/shop.contract_order/to_sales`,
			name: "报价转销售单",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
        offerCheck: {
			url: `${config.API_URL}/adminapi/shop.contractOrder/check`,
			name: "报价审核",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
}
